import http from "@/http/http";

const url = "orders";

export default {
    getListByPage: function (data,params){
        return http.post(`${url}/list.do`,data,{
            params
        });
    },
    edit: function (id) {
        console.log("查看id："+id);
        return http.get(`${url}/edit.do`, {
            params: {
                id
            }
        });
    },
    getone: function (id) {
        return http.get(`${url}/getone.do`, {
            params: {
                id: id
            }
        });
    },
    buy: function (data){
        return http.post(`${url}/buy.do`,data)
    },

}